package net.bw.realtime.jtp.mapper;

import net.bw.realtime.jtp.bean.TrafficProvinceReport;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
 * @ Author：liuyawei
 * @ Date：2025-05-24
 */
public interface TrafficProvinceStatsMapper {

    // 查询省份数据
    @Select("SELECT\n" +
            " province,\n" +
            " sum(pv_count) AS pv_count\n," +
            " sum(uv_count) AS uv_count\n," +
            " sum(session_count) AS session_count\n" +
            "FROM jtp_log_report.dws_traffic_page_view_window_report\n" +
            "WHERE toDate(window_start_time) = #{date}\n" +
            "GROUP BY province")
    List<TrafficProvinceReport> selectProvinceCount(String date);

}
